package com.wk1un2.service.impl;

import java.util.List;
import java.util.Map;

import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import com.wk1un2.entity.Evaluate;
import com.wk1un2.mapper.EvaluateMapper;
import com.wk1un2.service.EvaluateService;
import com.wk1un2.util.Result;

/**
 * 业务接口的实现类
 * 
 * @author Administrator
 *
 */
@Service // 扫描
public class EvaluateServiceImpl implements EvaluateService {

	@Autowired
 EvaluateMapper EvaluateMapper;// 自动注入mapper

	@Override
	public List<Evaluate> getAll(int page, int limit, String e_contents) {
		// TODO Auto-generated method stub
		return EvaluateMapper.getAll(page, limit,  e_contents);
	}

	@Override
	public Integer count() {
		// TODO Auto-generated method stub
		return EvaluateMapper.count();
	}

	@Override
	public Integer add(Map<String, Object> map) {
		// TODO Auto-generated method stub
		return EvaluateMapper.add(map);
	}

	@Override
	public Integer update(Map<String, Object> map) {
		// TODO Auto-generated method stub
		return EvaluateMapper.update(map);
	}

	@Override
	public Integer delete(int e_id) {
		// TODO Auto-generated method stub
		return EvaluateMapper.delete(e_id);
	}

	@Override
	public Result updateevaluatestate(Integer e_id, Integer e_state) {
		// TODO Auto-generated method stub
		EvaluateMapper.updateevaluatestate(e_id, e_state);
		return Result.ok(0);
	}

}
